package edu.washington.cs.workflow.matching;

import edu.washington.cs.workflow.analysis.AnalysisBuilder;
import edu.washington.cs.workflow.analysis.AnalysisBuilder.CG;
import edu.washington.cs.workflow.analysis.AnalysisBuilder.UIFramework;

public class ExecutionTraceMatcherFactory {
	
	public static ExecutionTraceMatcher createExecutionTraceMatcher(String oldClassPath, String oldMain,
			String[] oldPackages, String newClassPath, String newMain, String[] newPackages,
			UIFramework framework, CG type) {
		AnalysisBuilder oldBuilder = new AnalysisBuilder(oldClassPath, oldMain, oldPackages);
		oldBuilder.setUIFramework(framework);
		oldBuilder.setCGType(type);
		oldBuilder.buildAnalysis();
		
		AnalysisBuilder newBuilder = new AnalysisBuilder(newClassPath, newMain, newPackages);
		newBuilder.setUIFramework(framework);
		newBuilder.setCGType(type);
		newBuilder.buildAnalysis();
		
		ExecutionTraceMatcher matcher = new ExecutionTraceMatcher(oldBuilder, newBuilder);
		return matcher;
	}
}